
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type UserVisitRequest struct {

	Uid string `json:"uid" form:"uid"`

	Url string `json:"url" form:"url"`

	Ip string `json:"ip" form:"ip"`

	StayTime string `json:"stay_time" form:"stay_time"`

	AddTime string `json:"add_time" form:"add_time"`

	ChannelType string `json:"channel_type" form:"channel_type"`

	Province string `json:"province" form:"province"`

}

func (r *UserVisitRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *UserVisitRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"uid": "required",

		"url": "required",

		"ip": "required",

		"stay_time": "required",

		"add_time": "required",

		"channel_type": "required",

		"province": "required",

	}
}

func (r *UserVisitRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserVisitRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserVisitRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
